GetTask Collection |
This Web service operation takes as input the task IDs and returns the task definitions for the requested tasks and also provides the detail attribute.
GetTaskCollection_JSON_response.txt
Resource URI
/v1/tasks/getTaskCollection
Request Type
HTTP POST
HTTP Header Parameters
Parameter |
Description |
Accepted Input Values |
---|---|---|
SAMLart |
The SAML artifact received after authentication. | For more information on how to authenticate, see Login. |
otdsticket | The OTDSTicket received after authentication from OTDS. The OTDSTicket must be provided as a header parameter. | For more information on how to authenticate, see Login. |
Note : You must provide either SAMLart or otdsticket header parameter. If you provide both the header parameters, it will internally work based on SAMLart.
Note: The supported output formats are:
- JSON
- XML
Request Parameters
Parameter |
Description |
Accepted Input Values |
---|---|---|
ignoreInternals | Indicates whether to ignore internal details or not. | String value as true or false |
details |
Details of each task. |
String value as true or false |
collectionTaskId |
Contains date on which the task is due. |
For example: cordys_ajaxtoolkit_SoapDebuggerTask |
Note: All the above parameters must be send inside attribute value of the GetTaskCollection object in the payload section of the HTTP POST call.
Sample HTTP Payload
POST accepts the payload content only in the XML format as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <GetTaskCollection ignoreInternals="false" xmlns="http://schemas.cordys.com/task/1.0/runtime/"> <Task id="cordys_ajaxtoolkit_SoapDebuggerTask" detail="true"/> </GetTaskCollection>
Sample Client Example
Add the HTTP Payload as follows:
public static void main(String[] args) throws JAXBException, ClientProtocolException, IOException { com.cordys.entity.bean.GetTaskCollection assignTaskObj = new com.cordys.entity.bean.GetTaskCollection(); com.cordys.entity.bean.GetTaskCollection.Task task=new com.cordys.entity.bean.GetTaskCollection.Task(); task.setId("cordys_ajaxtoolkit_SoapDebuggerTask"); task.setDetail("true"); assignTaskObj.setIgnoreInternals(false); assignTaskObj.setTask(task); StringWriter writer = new StringWriter(); JAXBContext jaxbContext = JAXBContext.newInstance(com.cordys.entity.bean.GetTaskCollection.class); Marshaller jaxbMarshaller = jaxbContext.createMarshaller(); jaxbMarshaller.marshal(assignTaskObj, writer); DefaultHttpClient httpClient = new DefaultHttpClient(); // Define a postRequest request HttpPost postRequest = new HttpPost("http://<HOST>:<PORT>/BPMService/v1/tasks/getTaskCollection"); // Set the request post body StringEntity userEntity = new StringEntity(writer.getBuffer().toString()); //userEntity.setContentType("application/xml"); postRequest.setEntity(userEntity); ... }
Note: The com.cordys.entity.bean.GetTaskCollection object structure has been attached below, which is expected as a parameter of the REST API:
public Response transferTask(com.cordys.entity.bean.GetTaskCollection)
GetTaskCollection.java class is packed on BPMServiceClient.jar.
Response Parameters
Parameter |
Description |
---|---|
Task |
Provides the task details on the basis of input values
|
IgnoreInternals |
Details of the Ignore Internals |
Sample Response
Please refer "GetTaskCollection_JSON_response.txt" attached file for complete response. JSON Response : { tuple: [759]0: { old: [1]0: { Task: { id: "005056C0-0008-11E0-F37E-DC9E2F48B71E"type: "UI_TASK"name: "popupcondition"dn: nullconfigTaskId: null } - }-- }-1: { old: [1]0: { Task: { id: "005056C0-0008-71DE-B82A-9F87A5E32D28"type: "UI_TASK"name: "unpublishmodel"dn: nullconfigTaskId: null } - }-- }-2: { old: [1]0: { Task: { id: "005056C0-0008-71DF-8585-335395701FC5"type: "UI_TASK"name: "mdmmatch"dn: nullconfigTaskId: null } - }-- }-3: { old: [1]0: { Task: { id: "cordys_orch_CoBOCBrowserTask"type: "UI_TASK"name: "CoBOC Browser"dn: nullconfigTaskId: null } - }-- }-4: { old: [1]0: { Task: { id: "1286dc06-6c31-428f-886d-8f559e15636b"type: "UI_TASK"name: "googlegadget_getsource"dn: nullconfigTaskId: null } - }-- }-5: { old: [1]0: { Task: { id: "001E3780-4848-71DF-A97F-9A4101A015F5"type: "UI_TASK"name: "VariableDefinition"dn: nullconfigTaskId: null } - }-- ... }-758: { old: [1]0: { Task: { id: " {CF5AA5BD-EB48-401C-A574-3948C67DD0ED} "type: "UI_TASK"name: "class_from_query"dn: nullconfigTaskId: null }- }-- }--ignoreInternals: null }